{include file="public/head"}
<body>
    <div class="layui-card layadmin-header">
        {$breadcrumb|raw}
    </div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">{$title|default=''}</div>
                    <div class="layui-card-body">
                        <form action="{:url('')}" class="layui-form" lay-filter="edit-form" method="post">
                            <div class="layui-form-item">
                                <label class="layui-form-label">菜单名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="post[name]" lay-verify="require" value="{$info.name|default=''}" autocomplete="off" placeholder="请输入菜单名称" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">url</label>
                                <div class="layui-input-block">
                                    <input type="text" name="post[url]" lay-verify="require" value="{$info.url|default=''}" autocomplete="off" placeholder="请输入可用于url函数生成的url格式(**/**/**)或包含http的完整url(http[s]://www.**.com/**)" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">父菜单</label>
                                    <div class="layui-input-inline">
                                        <select name="post[parent_id]" lay-filter="parent_select">
                                            <option value="0">顶级菜单</option>
                                            {assign name="id" value="$info.id|default=''"}
                                            {volist name="select_view" id="menu"}
                                            {neq name="menu.id" value="$id"}
                                            <option value="{$menu.id}"
                                                    {notempty name="info"}
                                                    {eq name="$info.parent_id" value="$menu.id"}
                                                    selected
                                                    {/eq}
                                                    {/notempty}
                                            >{$menu.name|raw}</option>
                                            {/neq}
                                            {/volist}
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">图标</label>
                                <div class="layui-input-block">
                                    <input type="text" id="icon" name="post[icon]" lay-filter="icon" value="{$info.icon|default=''}">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">排序</label>
                                <div class="layui-input-block">
                                    <input type="number" name="post[sort]" lay-verify="require" value="{$info.sort|default=0}" autocomplete="off" placeholder="请输入排序数字，数字越小越靠前" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">是否隐藏</label>
                                <div class="layui-input-block">
                                    <input type="checkbox" name="post[is_hide]" value="1" lay-skin="switch" lay-filter="is_hide" lay-text="是|否"
                                           {notempty name="info"}
                                           {eq name="$info.is_hide" value="1"}
                                           checked
                                           {/eq}
                                        {/notempty}
                                    >
                                </div>
                            </div>
                            <input type="hidden" name="post[id]" value="{$info.id|default=0}">
                            <div class="layui-form-item layui-layout-admin">
                                <div class="layui-input-block">
                                    <div class="layui-footer" style="left: 0;">
                                        <button class="layui-btn" lay-submit="" lay-filter="submit-form">立即提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file="public/script"}
</body>
</html>